home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / arvis1 / traininp.frm < prev    next >
Text File  |  1997-08-09  |  8KB  |  235 lines

  1. VERSION 5.00
  2. Begin VB.Form InputWindow2 
  3.    BorderStyle     =   1  'Fixed Single
  4.    Caption         =   "You Have Beaten The Best Time!"
  5.    ClientHeight    =   3165
  6.    ClientLeft      =   45
  7.    ClientTop       =   330
  8.    ClientWidth     =   4590
  9.    ClipControls    =   0   'False
  10.    ControlBox      =   0   'False
  11.    BeginProperty Font 
  12.       Name            =   "Times New Roman"
  13.       Size            =   8.25
  14.       Charset         =   0
  15.       Weight          =   400
  16.       Underline       =   0   'False
  17.       Italic          =   0   'False
  18.       Strikethrough   =   0   'False
  19.    EndProperty
  20.    LinkTopic       =   "Form1"
  21.    MaxButton       =   0   'False
  22.    MinButton       =   0   'False
  23.    Moveable        =   0   'False
  24.    ScaleHeight     =   3165
  25.    ScaleWidth      =   4590
  26.    StartUpPosition =   2  'CenterScreen
  27.    Begin VB.TextBox NewName 
  28.       BeginProperty Font 
  29.          Name            =   "MS Sans Serif"
  30.          Size            =   8.25
  31.          Charset         =   0
  32.          Weight          =   400
  33.          Underline       =   0   'False
  34.          Italic          =   0   'False
  35.          Strikethrough   =   0   'False
  36.       EndProperty
  37.       Height          =   330
  38.       Left            =   90
  39.       TabIndex        =   0
  40.       Top             =   2205
  41.       Width           =   4380
  42.    End
  43.    Begin VB.Label Title 
  44.       Alignment       =   2  'Center
  45.       BackStyle       =   0  'Transparent
  46.       Caption         =   "You Have Betten The High Time For Quad-Ball !"
  47.       BeginProperty Font 
  48.          Name            =   "Times New Roman"
  49.          Size            =   24
  50.          Charset         =   0
  51.          Weight          =   700
  52.          Underline       =   0   'False
  53.          Italic          =   0   'False
  54.          Strikethrough   =   0   'False
  55.       EndProperty
  56.       ForeColor       =   &H0000FFFF&
  57.       Height          =   1635
  58.       Left            =   0
  59.       TabIndex        =   4
  60.       Top             =   0
  61.       Width           =   4515
  62.    End
  63.    Begin VB.Label Label2 
  64.       BackStyle       =   0  'Transparent
  65.       Caption         =   "Enter Your Name:"
  66.       BeginProperty Font 
  67.          Name            =   "Times New Roman"
  68.          Size            =   9.75
  69.          Charset         =   0
  70.          Weight          =   700
  71.          Underline       =   0   'False
  72.          Italic          =   0   'False
  73.          Strikethrough   =   0   'False
  74.       EndProperty
  75.       ForeColor       =   &H00FFFF00&
  76.       Height          =   240
  77.       Left            =   90
  78.       TabIndex        =   3
  79.       Top             =   1890
  80.       Width           =   1500
  81.    End
  82.    Begin VB.Label Label3 
  83.       Alignment       =   2  'Center
  84.       AutoSize        =   -1  'True
  85.       BackStyle       =   0  'Transparent
  86.       Caption         =   "OK"
  87.       BeginProperty Font 
  88.          Name            =   "Times New Roman"
  89.          Size            =   20.25
  90.          Charset         =   0
  91.          Weight          =   400
  92.          Underline       =   0   'False
  93.          Italic          =   0   'False
  94.          Strikethrough   =   0   'False
  95.       EndProperty
  96.       ForeColor       =   &H00008000&
  97.       Height          =   465
  98.       Left            =   660
  99.       TabIndex        =   2
  100.       Top             =   2655
  101.       Width           =   585
  102.    End
  103.    Begin VB.Label Label4 
  104.       Alignment       =   2  'Center
  105.       AutoSize        =   -1  'True
  106.       BackStyle       =   0  'Transparent
  107.       Caption         =   "Cancel"
  108.       BeginProperty Font 
  109.          Name            =   "Times New Roman"
  110.          Size            =   20.25
  111.          Charset         =   0
  112.          Weight          =   400
  113.          Underline       =   0   'False
  114.          Italic          =   0   'False
  115.          Strikethrough   =   0   'False
  116.       EndProperty
  117.       ForeColor       =   &H00008000&
  118.       Height          =   465
  119.       Left            =   2745
  120.       TabIndex        =   1
  121.       Top             =   2655
  122.       Width           =   1155
  123.    End
  124. End
  125. Attribute VB_Name = "InputWindow2"
  126. Attribute VB_GlobalNameSpace = False
  127. Attribute VB_Creatable = False
  128. Attribute VB_PredeclaredId = True
  129. Attribute VB_Exposed = False
  130. '»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»'
  131. 'This Form Is Like The "INPUTWINDOW" but Is Used For High Time Scores '
  132. '_____________________________________________________________________'
  133. Private Sub Form_Load()
  134.  InputLoaded = True
  135.  Call Set_Mouse_X_Y(Me.Left / Screen.TwipsPerPixelX + 100, Me.Top / Screen.TwipsPerPixelY + 100)
  136.  Exit2Mouse = False
  137.  Me.Picture = ParentForm.StatBox.Picture
  138.  Me.Show
  139.  Me.Refresh
  140.  LimitMovement
  141. End Sub
  142. Private Sub LimitMovement()
  143. Do
  144.   If Exit2Mouse = True Then GoTo nd:
  145.   Me.ZOrder 0
  146.   DoEvents
  147.   KeepMouseOnForm
  148.  Loop Until Exit2Mouse = True
  149. nd:
  150. Unload Me
  151. End Sub
  152. Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
  153.  InputLoaded = False
  154.  Exit2Mouse = True
  155. End Sub
  156. Private Sub Form_Unload(Cancel As Integer)
  157.  InputLoaded = False
  158. End Sub
  159. Private Sub Label3_Click()
  160.  Call SaveTimeTraining(NewName.Text, ParentForm.AllTime.Caption)
  161.  Unload Me
  162. End Sub
  163. Private Sub Label3_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  164.  If Label3.Tag = "yes" Then Exit Sub
  165.  Label3.Tag = "yes"
  166.  If Label4.Tag = " yes" Then
  167.   Label4.ForeColor = RGB(0, 90, 0)
  168.   Label4.Top = Label4.Top + 50
  169.   Label4.FontSize = Label4.FontSize - 5
  170.   Label4.Tag = "no"
  171.  End If
  172.  WAVPlay "click.qbs"
  173.  Label3.Top = Label3.Top - 50
  174.  Label3.ForeColor = RGB(0, 255, 0)
  175.  Label3.FontSize = Label3.FontSize + 5
  176.  End Sub
  177. Private Sub Label4_Click()
  178.  Dim Result As VbMsgBoxResult
  179.  Result = MsgBox("Are You Sure?, If You Click OK Your New Top Score Will not Be Saved!", vbOKCancel, "Confirmation")
  180.  If Result = vbCancel Then
  181.   Exit Sub
  182.  Else
  183.   Exit2Mouse = True
  184.   Unload Me
  185.  End If
  186. End Sub
  187. Private Sub Label4_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  188.  If Label4.Tag = "yes" Then Exit Sub
  189.  Label4.Tag = "yes"
  190.  If Label3.Tag = " yes" Then
  191.   Label3.ForeColor = RGB(0, 90, 0)
  192.   Label3.Top = Label3.Top + 50
  193.   Label3.FontSize = Label3.FontSize - 5
  194.   Label3.Tag = "no"
  195.  End If
  196.  WAVPlay "click.qbs"
  197.  Label4.ForeColor = RGB(0, 255, 0)
  198.  Label4.Top = Label4.Top - 50
  199.  Label4.FontSize = Label4.FontSize + 5
  200.  End Sub
  201. Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  202.  If Label4.Tag = "yes" Then
  203.   Label4.ForeColor = RGB(0, 90, 0)
  204.   Label4.Top = Label4.Top + 50
  205.   Label4.FontSize = Label4.FontSize - 5
  206.   Label4.Tag = "no"
  207.  End If
  208.  If Label3.Tag = "yes" Then
  209.   Label3.ForeColor = RGB(0, 90, 0)
  210.   Label3.Top = Label3.Top + 50
  211.   Label3.FontSize = Label3.FontSize - 5
  212.   Label3.Tag = "no"
  213.  End If
  214.  Label4.ForeColor = RGB(0, 90, 0)
  215.  Label3.ForeColor = RGB(0, 90, 0)
  216. End Sub
  217. Private Sub KeepMouseOnForm()
  218. If Exit2Mouse = True Then GoTo nd:
  219. Me.ZOrder 0
  220. If Get_Mouse_X >= Int((Me.Left + Me.Width) _
  221.  / Screen.TwipsPerPixelX) - 5 Then _
  222.  Set_Mouse_X ((Me.Left + Me.Width) / Screen.TwipsPerPixelX) - 5
  223. If Get_Mouse_X <= Int((Me.Left) _
  224.  / Screen.TwipsPerPixelX) Then _
  225.  Set_Mouse_X ((Me.Left) / Screen.TwipsPerPixelX) + 5
  226. If Get_Mouse_Y <= Int(Me.Top / Screen.TwipsPerPixelY) + 5 Then _
  227.  Set_Mouse_Y (Me.Top / Screen.TwipsPerPixelY) + 5
  228. If Get_Mouse_Y >= Int((Me.Top + Me.Height) / Screen.TwipsPerPixelY) - 5 Then _
  229.  Set_Mouse_Y ((Me.Top + Me.Height) / Screen.TwipsPerPixelY) - 5
  230. nd:
  231. End Sub
  232.  
  233.  
  234.  
  235.